package finalproject.mobapp.Main;

import finalproject.mobapp.R;
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.VideoView;

public class VideoPlayActivity extends Activity {
	VideoView videoView;
	String uri = null;
	
	/** Called when the activity is first created. */	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_videoplay);
		
		Bundle extras = getIntent().getExtras();
        if (extras!=null) {
        	uri = extras.getString("uri");
        } else {
        }
		
        //uri = "http://192.168.119.1/MyWebApp/res/1/747.3gp";
		videoView = (VideoView) findViewById(R.id.videoview);
		
		Uri video_url = Uri.parse(uri);
		videoView.setVideoURI(video_url);
		videoView.start();
	}
}
